<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="../back-common.jsp"%>
<%@ include file="/WEB-INF/pages/common/jquery2.1.4.jsp"%>
<%@ include file="/WEB-INF/pages/common/taglib.jsp"%>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<script src="<ls:templateResource item='/resources/plugins/My97DatePicker/WdatePicker.js'/>" type="text/javascript"></script>
<link href="<ls:templateResource item='/resources/plugins/select2-4.0/select2.css'/>" rel="stylesheet" />
<script src="<ls:templateResource item='/resources/plugins/select2-4.0/select2.full.min.js'/>" type="text/javascript"></script>
<script src="<ls:templateResource item='/resources/plugins/select2-4.0/i18n/zh-CN.js'/>" type="text/javascript"></script>
<script src="<ls:templateResource item='/resources/plugins/select2-4.0/makeSelect2.js'/>" type="text/javascript"></script>
    <%
        Long offset = (Long) request.getAttribute("offset");
    %>
<table class="${tableclass}" style="width: 100%">
	<tr>
		<th><strong class="am-text-primary am-text-lg"> 项目管理</strong> / 我的团队</th>
	</tr>
</table>
<form action="<ls:url address='/admin/myteam/query'/>" id="form1" method="post">
	<table class="${tableclass}" style="width: 100%">
		<tbody>
			<tr>
				<td>
					<div align="left" style="padding: 3px">
						<input type="hidden" id="curPageNO" name="curPageNO" value="${curPageNO}" /> 
						  &nbsp; 部门
							<input class="${inputclass}" type="text" name="deptName" maxlength="50" value="${bean.deptName }" />
						&nbsp; <select name="name" id="name" style="width: 120px">
							<c:if test="${not empty bean.name}">
								<option value="${bean.name}">${userRealName}</option>
							</c:if>
						</select>

						从:
						<input readonly="readonly"  name="startDate" id="startDate" class="Wdate" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',onpicked:function(){endDate.focus();},maxDate:'#F{$dp.$D(\'endDate\')}'})" value='<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>' />

						到:
						<input readonly="readonly" name="endDate" id="endDate" class="Wdate" type="text" onClick="WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'startDate\')}'})" value='<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>' />


						<input type="submit" class="criteria-btn" value="查询" />
					</div>
				</td>
			</tr>
		</tbody>
	</table>
</form>
<div align="center">
	<%@ include file="/WEB-INF/pages/common/messages.jsp"%>
	<display:table name="list" requestURI="/admin/myteam/query" id="item" export="false" sort="external" class="${tableclass}" style="width:100%">
		<display:column title="ID"><%=offset++%></display:column>
		<display:column title="部门" property="deptName"></display:column>
		<display:column title="姓名" property="realName"></display:column>
		<display:column title="用户名" property="name"></display:column>
		<display:column title="上级" property="leaderName"></display:column>
		<display:column title="共消耗工时"><fmt:formatNumber value="${item.consumed}" pattern="#.##" maxFractionDigits="2"/></display:column>
		<display:column title="操作" media="html" style="width:320px;min-width:320px">
		<div class="am-btn-toolbar">
			<div class="am-btn-group am-btn-group-xs">

				<button class="am-btn am-btn-default" onclick="window.location='${contextPath}/admin/myteam/userReport/${item.name}?startDate=<fmt:formatDate value="${startDate}" pattern="yyyy-MM-dd"/>&endDate=<fmt:formatDate value="${endDate}" pattern="yyyy-MM-dd"/>'"><span class="am-icon-pencil-square-o"></span>详情</button>
			</div>
		</div>
		</display:column>
	</display:table>
	<ls:page pageSize="${pageSize }" total="${total}" curPageNO="${curPageNO }" type="default" />
</div>
<script language="JavaScript" type="text/javascript">
		  $(document).ready(function() {
				 //三级联动
		     	 $("select.combox").initSelect();
		     	 makeSelect2(contextPath + "/admin/adminUser/userList","#name","选择用户","value","key");
		  });
        
			
		function pager(curPageNO){
			     document.getElementById("curPageNO").value=curPageNO;
			     document.getElementById("form1").submit();
			 }
			        
	
		</script>

		
		